remove duplicate characters from a given string